package com.inibb.app.util.upload;

import java.io.File;

public class FileExistenceHandler implements FileHandler {

	public ValidationResult handle(File file) {
		ValidationResult vr=new ValidationResult();
		if(!file.exists()){
			vr.getErrors().put(file.getName(), "This file doesn't exist");
		}
		return vr;
	}
	
	public static void main(String[] args) {
		File file=new File("d:/12.txt");
		ValidationResult result=new FileExistenceHandler().handle(file);
		System.out.println(result.getErrors().get(file.getName()));
	}
}
